package org.acghub.mtdb.core;

import org.acghub.mtdb.common.Table;

/**
 * @author zhouhe
 */
public interface CrudOperations<K, V> {
    boolean exists(Table table, K key);

    V select(Table table, K key);

    boolean insert(Table table, K key, V value);

    boolean update(Table table, K key, V value);

    void upsert(Table table, K key, V value);

    void delete(Table table, K key);

    void truncate(Table table);

    long count(Table table);
}
